var mysql=require('mysql')

var config=require('./config.js')

/* 连接数据库 */

var database=mysql.createConnection({
    host: config.host,
    user: config.user,
    port: config.port,
    password: config.password,
    database: config.database
})

database.connect(function(err){
    if(err){
        console.log(err)
        return
    }

    //console.log('连接成功')
})

module.exports=database